package com.satoken.Utils;

import cn.dev33.satoken.stp.StpInterface;
import com.satoken.Mapper.RoleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

//角色鉴权
@Component
public class InterfaceImpl implements StpInterface {
    @Autowired
    RoleMapper roleMapper;
    @Override
    public List<String> getPermissionList(Object o, String s) {
        return null;
    }

    @Override
    public List<String> getRoleList(Object o, String s ) {
        List<String> rs = new ArrayList<>();
        rs.add(roleMapper.getRole((String) o));
        return rs;
    }
}
